home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
i
/
imagefxv2.1a.lha
/
ImageFX
/
Rexx
/
Border.ifx
< prev
next >
Wrap
Text File
|
1996-03-02
|
2KB
|
99 lines
/*
* $VER: Border 2.0.0 (22.7.94)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* Revised for ImageFX release 2.0.
*
* This program will generate a 3D-looking border around the
* current image.
*
*/
OPTIONS RESULTS
GetMain ; IF result = "" THEN EXIT ; PARSE VAR result name width height depth
RequestNumber '"Border Thickness (Pixels):"' 10
IF rc ~= 0 THEN EXIT 0 /* cancelled? */
count = result
LockInput
SaveUndo ; Undo Off
BeginBar 'Border' count
LockGUI
Redraw Off
step = 255 / (count-3)
grey = step
le = 0
te = 0
wid = width
ht = height
DO i = 0 TO count - 3
UnlockGUI
Bar i
LockGUI
/* the bright side */
SetPalette '-1' grey grey grey
Line le te le+wid-1 te
Line le te le te+ht-1
/* the dark side */
SetPalette '-1' grey*2/3 grey*2/3 grey*2/3
Line le+wid-1 te le+wid-1 te+ht-1
Line le+wid-1 te+ht-1 le te+ht-1
grey = grey + step
le = le + 1
te = te + 1
wid = wid - 2
ht = ht - 2
END
grey = 255 - step
DO WHILE i < count
UnlockGUI
Bar i
LockGUI
/* the bright side */
SetPalette '-1' grey grey grey
Line le te le+wid-1 te
Line le te le te+ht-1
/* the dark side */
SetPalette '-1' grey*2/3 grey*2/3 grey*2/3
Line le+wid-1 te le+wid-1 te+ht-1
Line le+wid-1 te+ht-1 le te+ht-1
grey = grey - step
le = le + 1
te = te + 1
wid = wid - 2
ht = ht - 2
i = i + 1
END
UnlockGUI
EndBar
Redraw On ; Undo On
Redraw
UnlockInput
EXIT